// pages/withdrawList/withdrawList.js 
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    arrmonth: [],
    maxdate: '',
    arryear:[],
    // status=0:提现中；1：已提现；2：被驳回
    total: "0",
    li: [],
  },
  bindDateChange(e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      date: e.detail.value
    })
    var that = this;
    wx.request({
      url: app.siteInfo.shoppath + 'txdetail',
      method: "get",
      data: { 
        uid: app.siteInfo.uid, 
        com_part_id: app.siteInfo.com_part_id ,
        time:that.data.date
      },
      success: function (res) {
        that.setData({
          maxdate: res.data.maxdate,
          total: res.data.total,
          li: res.data.list,
        })
      }
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var that = this;
    wx.request({
      url: app.siteInfo.shoppath +'txdetail',
      method:"get",
      data:{uid:app.siteInfo.uid,com_part_id:app.siteInfo.com_part_id},
      success:function(res){
        that.setData({
          maxdate: res.data.maxdate,
          total: res.data.total,
          li: res.data.list,
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  // onShareAppMessage: function () {

  // }
})